import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
import HomeTop from '../views/HomeTop.vue'
import Classify from '../views/Classify.vue'
import Mall from '../views/Mall.vue'
import Personal from '../views/Personal.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home,
    children: [
      {
        path: 'home',
        component: HomeTop
      },
      {
        path: 'classify',
        component: Classify
      },
      {
        path: 'mall',
        component: Mall
      },
      {
        path: 'personal',
        component: Personal
      },
      {
        path: '',
        redirect: '/home'
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
